<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<div class="bjui-pageContent" style="top: 0px; bottom: 32px;">
    <form id="upInvestaAdviser_form_id" method="post" action="/admin/dataMap/dictionaries/updateOrAddDic">
        <h5>修改</h5>
        <div data-layout-h="0" class="bjui-row col-1">
            <input type="hidden" name="id" value="${adviserModel.id}">
            <label class="row-label">姓名</label>
            <div class="row-input">
                <input type="text" data-rule="required" name="name" size="20" value=${adviserModel.name}>
            </div>
            <label class="row-label">公司编号</label>
            <div class="row-input">
                <input type="text" data-rule="required" name="numb" size="20" value=${adviserModel.numb}>
            </div>
            <label class="row-label">手机号码</label>
            <div class="row-input">
                <input type="text" data-rule="mobile" name="phone" size="20" value=${adviserModel.phone}>
            </div>
            <label class="row-label">备注</label>
            <div class="row-input">
                <input type="text" name="remarks" size="20" value=${adviserModel.remarks}>
            </div>
        </div>
    </form>
</div>
<div class="bjui-pageFooter">
    <ul>
        <li>
            <button type="button" class="btn btn-red cancel" onclick="BJUI.dialog('closeCurrent');" data-icon="remove">
                <i class="fa fa-remove"></i> 取消
            </button>
        </li>
        <li>
            <button type="button" class="btn btn-default save" onclick="updateInverstaAdviser();" data-icon="save"><i
                    class="fa fa-save"></i> 保存
            </button>
        </li>
    </ul>
</div>
<script>

    /**
     * 提交保存信息
     */
    function updateInverstaAdviser() {
        BJUI.ajax('ajaxform', {
            url: '/admin/salesman/investaadviser/upInvestaAdviser',
            form: $("#upInvestaAdviser_form_id"),
            validate: true,
            loadingmask: true,
            callback: function (response, options) {
                if (response.haveError) {
                    BJUI.alertmsg('error', response.message);
                } else {
                    BJUI.alertmsg('ok', response.message, {
                        okCall: function () {
                            if (response.statusCode == 200) {
                                BJUI.dialog('closeCurrent');
                            }
                        }
                    });
                }
            }
        });
    }
</script>
